package com.itheima.mpermission.mapper;

import com.itheima.mpermission.pojo.Permission;
import com.leyou.common.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface  PermissionMapper extends BaseMapper<Permission> {
    /**
     * 根据角色id集合查询权限对象集合
     * @param roleIds
     * @return
     */
    List<Permission> selectByRoleIds(@Param("roleIds") List<Integer> roleIds);

    /**
     * 查询用户权限列表中的一级模块，不包含子模块
     * @param pid
     * @return
     */
    List<Permission> selectPermission(Long pid);
}
